<template>
	<view>
		<view class="count">共<text v-model="movie_count">{{movie_count}}</text>部影片</view>
		<view class="all" v-for="(item2,index2) in want_watch_movie" :key="index2">
			<view class="image"><image :src="item2.want_watch_movie_video"></image></view>
			<view class="content">
				<view class="title">{{item2.want_watch_movie_name}}</view>
				<view class="people_count">{{item2.want_watch_movie_count}}  人想看</view>
				<view class="director">{{item2.want_watch_movie_dirocter}}</view>
				<view class="time">{{item2.want_watch_movie_time}}  在中国大陆上映</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				movie_count:'',
				want_watch_movie:[],
			}
		},
		onLoad() {
			this.getWantWatchMovie();
			this.getMovieCount();
		},
		methods: {
			getWantWatchMovie(){
				uni.request({
					url:'http://www.moive.com/api/movie_mysql/want_movie.php',
					 method: 'GET',
					          success: (res)=>{				
						 this.want_watch_movie=res.data;
						 console.log(this.want_watch_movie)
							  },
					          fail: (err)=>{}
				})
			},
			getMovieCount(){
				uni.request({
					url:'http://www.moive.com/api/movie_mysql/want_movie_count.php',
					 method: 'GET',
					        success: (res)=>{
						 this.movie_count=res.data;
						 console.log(this.movie_count)
							  },
					          fail: (err)=>{}
				})
			}
		}
	}
</script>

<style>
   .count{
	font-size: 13px;
	width:92%;
	margin:0 auto;
	margin-top: 10px;
	margin-left:15px;
	}
	.all{
		width:92%;
		height:100px;
		background-color: rgb(243, 244, 245);
		margin: 0 auto;
		margin-top: 10px;
	}
	.image{
		width:20%;
		height:85%;
		margin-top:7.5px;
		margin-left:10px;
		float:left;
		display: block;
	}
	.image image{
		width:100%;
		height:100%;
		border-radius: 7px;
	}
	.content{
		width:77%;
		height:85%;
		margin-top:7.5px;
		/* margin-left:10px; */
		float:left;
		display: block;
	}
	.title{
		width:100%;
		font-size: 15px;
		margin-left: 8px;
	}
	.people_count{
		width:100%;
		font-size: 12px;
		margin-left: 8px;
		margin-top:5px;
	}
    .director{
		width:100%;
		font-size: 12px;
		margin-left: 8px;
		margin-top:5px;
	}
	.time{
		width:100%;
		font-size: 12px;
		margin-left: 8px;
		margin-top:5px;
	}
</style>
